PrcViewʵópv.exeʹ˵


pv displays information about the running processes.
pvʾеĽϢ
pv v 3.11.1.1, Copyright (c) Igor Nys, 2000-2005.

Usage: pv -[<MODE>] -[<OPTIONS>] <ARGUMENTS>...-[<OPTIONS>]
 pv -[<ģʽ>] -[ ѡ  > ] <     >...-[< ѡ  >]

Modes:
ģʽ
  -s       --summary   show usage for the specified MODULE
  -s       --summary   ʾָģʹժҪ
  -h,-?    --help      display this help information
  -h,-?    --help      ʾϢ

Actions:
:
  -k       --kill      kill process
  -k       --kill      ɱָ
  -a       --activate  brings process main window in the foreground
  -a       --activate  ̣ڷõǰ
  -c       --close     close (send WM_CLOSE) to the PROCESS
  -c       --close     رս(WM_CLOSEָ
  -p[nihr] --priority  set priority to "Normal", "Idle", "High", "Real Time"
    [ba]               "Below Normal" and "Above Normal" only on W2K or higher
  -p[nihr] --priority  ȼΪáߡʵʱ
    [ba]              ͡,ֻWindow 2000߰汾

Output Options:
ѡ:
  -e,      --extend    show additional information if available
  -e,      --extend    ʾչϢ
  -l,      --long      show command line (can also be a filter)
  -l,      --long      ʾ(Ҳǹ)
  -q,      --quiet     supress headers and produce a tab-separated list
  -q,      --quiet     ģʽ,ͷͲƱָб
  -b       --bare      show process ID only ()
  -b       --bare      ʾID

Input Options:
ѡ:
  -f,      --force     never prompt
  -f,      --force     ǿʽ,ʾʾϢ
  -i,      --id        use process ID instead of the PROCESS name
  -i,      --id        ʹýIDǽ̵

Filters:
:
  -l[mask] --long      include processes with command line matching mask
  -l[mask] --long      ʾвƥĽ
  -w[mask] --window    show processes with visible windows matching mask,
                       -e includes in search also invisible windows
  -w[mask] --window    ʾɼƥĽ
                       -e ͬʱʹʱҲʾ벻ɼƥĽ
  -u[mask] --usage     show processes using modules that matches mask
  -u[mask] --usage     ʾʹָģƥģĽ
  -t[root] --tree      display process tree starting starting from the root
  -t[root] --tree      [ӸĿ¼]ʾ

Extra Information Options:
Ϣѡ:
  -g       --getenv    get startup environment for the  PROCESS
  -g       --getenv    ȡ
  -m       --module    show modules used by specified PROCESS
  -m       --module    ʾָʹõģ

Execution Options:
ִѡ
  -d[time] --delay     delay time in milliseconds before executing command
  -d[time] --delay     ִǰӳʱ䣬λ:
  -r[err]  --repeat    repeat command in a cycle, while (%ERRORLEVEL% > err) 
  -r[err]  --repeat    һظ%ERRORLEVEL% > errʱ
  -n       --number    %ERRORLEVEL% = negated number of matched processes
  -n       --number    %ERRORLEVEL% = ƥĸֵ
  -x[a]    --exit      wait for the process completion (exit)
                        'a' flag waits for all processes, -d sets time-out
  -x[a]    --exit      ȴ̽˳
                       aʾȴн̽-d ʱ
  -@[file_name]        read arguments from specified file or from
                       standard input after processing the command line
  -@[file_name]        ָļкı׼жȡ

Arguments can contain '*' and '?' wildcards.
п԰'*''?'ͨ

Use return code (%ERRORLEVEL%) in batch files:
ļʹ÷ش루%ERRORLEVEL%
    0 - process found (negated number of processes if -n is specified)
    0 - ֹ (ʹ-nѡʱ,Ϊ̺ŵĸ)
    1 - empty result set, 2 - programm error
    1 - Ϊգ        2 - 

Examples:
ʹʾ
  pv myprocess.exe        get process ID for myprocess.exe.
  pv myprocess.exe        myprocess.exeĽID
  pv -e                   get extended list of running processes.
  pv -e                   չнб
  pv -k sleep*            kill all processes starting with "sleep"
  pv -k sleep*            ɱԡsleepͷĽ
  pv -m -e explorer.exe   get extended information about explorer's modules
  pv -m -e explorer.exe   explorer.exeʹģչϢ
  pv -u oleaut*.dll       list of all processes that use matching dll
  pv -u oleaut*.dll       гʹoleaut*.dllƥģĽ
  pv -ph w*.exe           set priority to hight for all matching processes
  pv -ph w*.exe           w*.exeƥĽóɸȼ
  pv explorer.exe -l"*/S" looks for explorer process with /S switch
  pv explorer.exe -l"*/S" ʹ/Sexplorer.exe 
  pv -r0 -d2000 calc.exe "2>nul" checks every 2 seconds if calc.exe is running
  pv -r0 -d2000 calc.exe "2>nul" calc.exe,ȴ2Ӻ?
